<form class="form-horizontal">

 
  <div class="modal-body">
    <div class="form-group">
      <div class="col-sm-2">
        <select ng-model="req.method" class="form-control">
          <option value="GET">GET</option>
          <option value="POST">POST</option>
          <option value="HEAD">HEAD</option>
          <option value="PUT">PUT</option>
          <option value="OPTIONS">OPTIONS</option>
          <option value="DELETE">DELETE</option>
        </select>
      </div>
      <div class="col-sm-8">
        <input required placeholder="EndPoint" ng-model="req.url" type="text" class="form-control" >             
      </div>

      <div class="col-sm-2">
        <button type="button" ng-click="submit()" class="btn btn-success">
          提交
        </button>            
      </div>
    </div> 

    <hr>

    <h6>请求参数</h6>

    <uib-tabset>
      <uib-tab select="paramSelect('json')" heading="Param">
        <!-- KV式 -->
        <div ng-repeat="p in params"  class="form-group">
          <div class="col-sm-2">
            <input required placeholder="name" ng-model="p.name" type="text" class="form-control input-sm" >
          </div>
          <div class="col-sm-8">
            <input required placeholder="value" ng-model="p.value" type="text" class="form-control input-sm" > 

          </div>
          <div class="col-sm-2">
            <a ng-click="rmParam(p)" class="btn btn-danger btn-xs">
              删除
            </a> 
          </div>
        </div>

        <div class="form-group">
          <div class="col-sm-12">
            <a ng-click="addParam()" class="btn btn-success btn-xs">
              添加参数
            </a>  
          </div>    
        </div>    
        <!-- KV式 -->  
      </uib-tab>
      <uib-tab select="paramSelect('raw')"  heading="Raw">
        <!-- raw-json -->
        <textarea class="form-control"></textarea>
        <!-- raw-json -->
      </uib-tab>
    </uib-tabset>


  
    <hr>

    <h6 class="modal-title">请求头</h5>
  
    <div ng-repeat="p in headers" class="form-group">
      <div class="col-sm-2">
        <input list="reqHeaderNames" required placeholder="name" ng-model="p.name" type="text" class="form-control input-sm" >
      </div>
      <div class="col-sm-8">
        <input required placeholder="value" ng-model="p.value" type="text" class="form-control input-sm" list="{{p.name =='Content-Type'?'contentTypeValues':''}}" > 
      </div>
      <div class="col-sm-2">
        <a ng-click="rmHeader(p)" class="btn btn-danger btn-xs">
          删除
        </a>        
      </div>
    </div>
    <datalist id="reqHeaderNames">
      <option value="Content-Type">
      <option value="Cookie">
      <option value="Authorization">
    </datalist>

    <datalist id="contentTypeValues">
      <option value="text/plain; charset=UTF-8">
      <option value="application/json; charset=UTF-8">
      <option value="text/xml; charset=UTF-8">
    </datalist>    


    <div class="form-group">
      <div class="col-sm-12">
        <a ng-click="addHeader()" class="btn btn-success btn-xs">
          添加请求头
        </a> 
      </div>    
    </div>
  </div>


</form>




